<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>中文注册</title>
    <link rel="shortcut icon" href="../static/damai/image/label.ico" th:href="@{/damai/image/label.ico}" type="image/x-icon">
    <link rel="stylesheet" href="../static/damai/css/register.css" th:href="@{/damai/css/register.css}">
    <link rel="stylesheet" href="../static/damai/css/register-center.css" th:href="@{/damai/css/register-center.css}">
    <link rel="stylesheet" href="../static/damai/css/register-footer.css" th:href="@{/damai/css/register-footer.css}">

</head>
<body>

<!--主体内容start-->
<div class=" page-layout page-main-content">
    <!--头部信息start-->
    <div class="layout layout-grid-0">
        <!--row -->
        <div class="grid-0">
            <!-- col -->
            <div class="col col-main">
                <div class="main-wrap J_Region">
                    <!-- module -->
                    <div data-spm="1267453" data-moduleid="0" data-name="kissy-login-top" data-guid="1267453"
                         id="guid-1267453" data-scene-id="2015134" data-scene-version="0" data-hidden=""
                         data-gitgroup="damai-mod" data-ext="" data-engine="tce" class="kissy-login-top J_Module"
                         tms="kissy-login-top/0.0.9" tms-datakey="tce/2015134">
                        <div class="pcbar">
                            <div class="pcbar__bd w1200">
                                <a href="javascript:void(0)" th:href="@{/}" class="pcbar__bd__logo">
                                    <img src="../static/damai/image/login/TB1TikIsAvoK1RjSZFDXXXY3pXa-230-104.png"
                                    th:src="@{/damai/image/login/TB1TikIsAvoK1RjSZFDXXXY3pXa-230-104.png}">
                                </a>
                                <a href="javascript:void(0)" target="_blank" class="pcbar__bd__btn">English</a>
                            </div>
                        </div>
                    </div>
                    <!--module -->
                </div>
            </div>
            <!--col -->
        </div>
        <!-- row -->
    </div>
    <!--头部信息end-->
    <!--注册主体start-->
    <div class="layout layout-grid-0">
        <!--row -->
        <div class="grid-0">
            <!-- col -->
            <div class="col col-main">
                <div class="main-wrap J_Region">
                    <!-- module -->
                    <div data-spm="1027582" data-moduleid="0" data-name="kissy-register-chinese" data-guid="1027582"
                         id="guid-1027582" data-scene-id="1451321" data-scene-version="2" data-hidden=""
                         data-gitgroup="damai-mod" data-ext="" data-engine="tce" class="kissy-register-chinese J_Module"
                         tms="kissy-register-chinese/0.0.18" tms-datakey="tce/1451321">
                        <div class="J_ModContainer">
                            <div class="module-wrap">
                                <div class="register " data-spm-anchor-id="a211rg.11305495.1027582.i1.129c40cdbs9iAU">
                                    <div class="w1200">
                                        <!--中心主体start-->
                                        <div style="width: 100%;height: 450px">
                                            <link rel="stylesheet" href="../static/damai/css/register-center.css" th:href="@{damai/css/register-center.css}">

                                            <div id="container">
                                                <div data-reactroot="" class="schema-form">

                                                    <form class="next-form next-form-left ver next-form-large" th:action="@{/user/register}" method="post"  data-for="form">
                                                        <div class="form-content">
                                                            <div class="next-form-item next-row has-success"
                                                                 label="手机号码:"><label required=""
                                                                                      class="next-col-8 next-form-item-label">手机号码:</label>
                                                                <div class="next-col-10 next-form-item-control">
                                                                    <div class="select-mobile-input-component">
                                                                        <!--<div class="mobileCountrySelect"><span-->
                                                                        <!--value="CN" lang="zh-cn"-->
                                                                        <!--class="next-select large" tabindex="0"-->
                                                                        <!--style="min-width: 145px; width: 145px; border-right: 0px;"><input-->
                                                                        <!--type="hidden" name="select-faker"-->
                                                                        <!--value="CN"><span-->
                                                                        <!--class="next-select-inner"><div><div-->
                                                                        <!--class="mobile-option"><span-->
                                                                        <!--class="mobile-text"-->
                                                                        <!--title="中国大陆">中国大陆</span><span-->
                                                                        <!--class="mobile-code">&lt;!&ndash; react-text: 16 &ndash;&gt;+-->
                                                                        <!--&lt;!&ndash; /react-text &ndash;&gt;&lt;!&ndash; react-text: 17 &ndash;&gt;86-->
                                                                        <!--&lt;!&ndash; /react-text &ndash;&gt;</span></div></div></span><i-->
                                                                        <!--class="next-icon next-icon-arrow-down next-icon-medium next-select-arrow"></i></span>-->
                                                                        <!--</div>-->
                                                                        <span class="next-input next-input-single next-input-large mobile-input" style="width: 100%"><input
                                                                                type="text" value=""
                                                                                height="100%" placeholder="请输入您的手机号码" data-for="phone" name="phone"></span></div>
                                                                    <!-- react-text: 21 --> <!-- /react-text -->

                                                                    <!--<div class="next-form-item-explain" >&lt;!&ndash; react-text: 83 &ndash;&gt;手机号码格式不正确，请重新输入&lt;!&ndash; /react-text &ndash;&gt;</div>-->

                                                                    <div class=""></div><!-- react-text: 23 -->
                                                                    <!-- /react-text -->
                                                                    <div class="schema-form-item-tips"></div>
                                                                </div>
                                                            </div>
                                                            <div class="next-form-item next-row" label="登录密码:"><label
                                                                    for="password" required=""
                                                                    class="next-col-8 next-form-item-label">登录密码:</label>
                                                                <div class="next-col-10 next-form-item-control"><span
                                                                        class="next-input next-input-single next-input-large"><input
                                                                        type="password" autocomplete="off" value=""
                                                                        placeholder="设置你的登录密码" data-meta="Field"
                                                                        id="password" height="100%" data-for="password" name="password"></span>
                                                                    <!-- react-text: 30 --> <!-- /react-text -->

                                                                    <!--<div class="next-form-item-explain" data-spm-anchor-id="a211eg.10560647.0.i6.e66117ebYKKLAG">&lt;!&ndash; react-text: 86 &ndash;&gt;密码设置不符合要求&lt;!&ndash; /react-text &ndash;&gt;</div>-->

                                                                    <!--<div class="next-form-item-explain" data-spm-anchor-id="a211eg.10560647.0.i6.e66117ebYKKLAG">&lt;!&ndash; react-text: 92 &ndash;&gt;请设置登录密码&lt;!&ndash; /react-text &ndash;&gt;</div>-->
                                                                    <div class=""></div><!-- react-text: 32 -->
                                                                    <!-- /react-text -->
                                                                    <div class="schema-form-item-tips"></div>
                                                                </div>
                                                            </div>
                                                            <div class="next-form-item next-row" label="密码确认:"><label
                                                                    for="rePassword" required=""
                                                                    class="next-col-8 next-form-item-label">密码确认:</label>
                                                                <div class="next-col-10 next-form-item-control"><span
                                                                        class="next-input next-input-single next-input-large"><input
                                                                        type="password" placeholder="请再次输入你的登录密码"
                                                                        data-meta="Field" id="rePassword" value=""
                                                                        height="100%" data-for="rePassword" ></span><!-- react-text: 39 -->
                                                                    <!-- /react-text -->

                                                                    <!--<div class="next-form-item-explain">&lt;!&ndash; react-text: 93 &ndash;&gt;请再次确认登录密码&lt;!&ndash; /react-text &ndash;&gt;</div>-->
                                                                    <!--<div class="next-form-item-explain">两次输入的密码不一致，请重新输入&lt;!&ndash; /react-text &ndash;&gt;</div>-->
                                                                    <div class=""></div><!-- react-text: 41 -->
                                                                    <!-- /react-text -->
                                                                    <div class="schema-form-item-tips"></div>
                                                                </div>
                                                            </div>
                                                            <!--<div class="next-form-item next-row" label="滑动验证:"><label-->
                                                                    <!--required=""-->
                                                                    <!--class="next-col-8 next-form-item-label">滑动验证:</label>-->
                                                                <!--<div class="next-col-10 next-form-item-control">-->
                                                                    <!--<div id="register_no_captcha" class="nc-container"-->
                                                                         <!--data-nc-idx="1">-->
                                                                        <!--<div id="nc_1_wrapper" class="nc_wrapper">-->
                                                                            <!--<div id="nc_1_n1t" class="nc_scale">-->
                                                                                <!--<div id="nc_1__bg" class="nc_bg"></div>-->
                                                                                <!--<span id="nc_1_n1z"-->
                                                                                      <!--class="nc_iconfont btn_slide"></span>-->
                                                                                <!--<div id="nc_1__scale_text"-->
                                                                                     <!--class="scale_text slidetounlock">-->
                                                                                    <!--<span class="nc-lang-cnt"-->
                                                                                          <!--data-nc-lang="_startTEXT">请按住滑块，拖动到最右边</span>-->
                                                                                <!--</div>-->
                                                                                <!--<div id="nc_1_clickCaptcha"-->
                                                                                     <!--class="clickCaptcha">-->
                                                                                    <!--<div class="clickCaptcha_text">-->
                                                                                        <!--<b id="nc_1__captcha_text"-->
                                                                                           <!--class="nc_captch_text"></b>-->
                                                                                        <!--<i id="nc_1__btn_2"-->
                                                                                           <!--class="nc_iconfont nc_btn_2 btn_refresh"></i>-->
                                                                                    <!--</div>-->
                                                                                    <!--<div class="clickCaptcha_img"></div>-->
                                                                                    <!--<div class="clickCaptcha_btn"></div>-->
                                                                                <!--</div>-->
                                                                                <!--<div id="nc_1_imgCaptcha"-->
                                                                                     <!--class="imgCaptcha">-->
                                                                                    <!--<div class="imgCaptcha_text"><input-->
                                                                                            <!--id="nc_1_captcha_input"-->
                                                                                            <!--maxlength="6" type="text"-->
                                                                                            <!--style="ime-mode:disabled">-->
                                                                                    <!--</div>-->
                                                                                    <!--<div class="imgCaptcha_img"-->
                                                                                         <!--id="nc_1__imgCaptcha_img"></div>-->
                                                                                    <!--<i id="nc_1__btn_1"-->
                                                                                       <!--class="nc_iconfont nc_btn_1 btn_refresh"-->
                                                                                       <!--onclick="document.getElementById('nc_1__imgCaptcha_img').children[0].click()"></i>-->
                                                                                    <!--<div class="imgCaptcha_btn">-->
                                                                                        <!--<div id="nc_1__captcha_img_text"-->
                                                                                             <!--class="nc_captcha_img_text"></div>-->
                                                                                        <!--<div id="nc_1_scale_submit"-->
                                                                                             <!--class="nc_scale_submit"></div>-->
                                                                                    <!--</div>-->
                                                                                <!--</div>-->
                                                                                <!--<div id="nc_1_cc" class="nc-cc"></div>-->
                                                                                <!--<i id="nc_1__voicebtn" tabindex="0"-->
                                                                                   <!--role="button"-->
                                                                                   <!--class="nc_voicebtn nc_iconfont"-->
                                                                                   <!--style="display:none"></i>-->
                                                                                <!--<b id="nc_1__helpbtn"-->
                                                                                   <!--class="nc_helpbtn"><span-->
                                                                                        <!--class="nc-lang-cnt"-->
                                                                                        <!--data-nc-lang="_learning">了解新功能</span></b>-->
                                                                            <!--</div>-->
                                                                            <!--<div id="nc_1__voice"-->
                                                                                 <!--class="nc_voice"></div>-->
                                                                        <!--</div>-->
                                                                    <!--</div>&lt;!&ndash; react-text: 47 &ndash;&gt; &lt;!&ndash; /react-text &ndash;&gt;-->
                                                                    <!--<div class=""></div>&lt;!&ndash; react-text: 49 &ndash;&gt;-->
                                                                    <!--&lt;!&ndash; /react-text &ndash;&gt;-->
                                                                    <!--<div class="schema-form-item-tips"></div>-->
                                                                <!--</div>-->
                                                            <!--</div>-->
                                                            <!--<div class="next-form-item next-row form-checkbox next-form-text-align"-->
                                                                 <!--label=" "><label-->
                                                                    <!--class="next-col-8 next-form-item-label"> </label>-->
                                                                <!--<div class="next-col-10 next-form-item-control">-->
                                                                    <!--<div class="form-checkbox">-->
                                                                        <!--<label class="next-checkbox ">-->
                                                                            <!--<span class="next-checkbox-inner">-->
                                                                                <!--<i class="next-icon next-icon-select next-icon-xs"></i>-->
                                                                            <!--</span>-->
                                                                            <!--<input type="checkbox" checked>-->
                                                                        <!--</label>-->
                                                                        <!--<span class="form-checkbox-label">-->
                                                                            <!--<div>-->
                                                                                <!--<p>-->
                                                                                    <!--我已阅读并同意-->
                                                                                    <!--<a href="javascript:void(0)" target="_blank">《会员协议》</a>-->
                                                                                    <!--和-->
                                                                                    <!--<a href="javascript:void(0)" target="_blank">《隐私权条款》</a>-->
                                                                            <!--</p>-->
                                                                        <!--</div>-->
                                                                        <!--</span>-->
                                                                    <!--</div>&lt;!&ndash; react-text: 60 &ndash;&gt; &lt;!&ndash; /react-text &ndash;&gt;-->
                                                                    <!--<div class=""></div>&lt;!&ndash; react-text: 62 &ndash;&gt;-->
                                                                    <!--&lt;!&ndash; /react-text &ndash;&gt;-->
                                                                    <!--<div class="schema-form-item-tips"></div>-->
                                                                <!--</div>-->
                                                            <!--</div>-->
                                                            <div class="next-row">
                                                                <div class="next-col next-col-offset-8">
                                                                    <button name="loginAction" type="button"
                                                                            class="next-btn next-btn-primary next-btn-large"
                                                                            style="margin-right: 12px; width: 150px;" data-for="registerBtn">
                                                                        <!-- react-text: 67 -->注册
                                                                        <!-- /react-text --></button>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </form>
                                                </div>
                                            </div>
                                        </div>
                                        <!--中心主体end-->
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!--module -->
                </div>
            </div>
            <!--col -->
        </div>
        <!-- row -->
    </div>
    <!--注册主体end-->
</div>
<!--主体内容end-->

<!--页面底部start-->
<link rel="stylesheet" href="../static/damai/css/register-footer.css" th:href="@{/damai/css/register-footer.css}">
<div class="layout layout-grid-0">
    <!--row -->
    <div class="grid-0">
        <!-- col -->
        <div class="col col-main">
            <div class="main-wrap J_Region">
                <!-- module -->
                <div class="kissy-pc-footer J_Module">
                    <div class="dm-footer">
                        <div class="w1200">
                            <ul class="footer__links">

                                <li class="footer__links__list"><a href="javascript:void(0)" target="_blank"
                                                                   data-spm="flink0">帮助中心</a></li>
                                <li class="footer__links__grep">|</li>

                                <li class="footer__links__list"><a
                                        href="javascript:void(0)" target="_blank"
                                        data-spm="flink1">公司介绍</a></li>
                                <li class="footer__links__grep">|</li>

                                <li class="footer__links__list"><a
                                        href="javascript:void(0)" target="_blank"
                                        data-spm="flink2">品牌识别</a></li>
                                <li class="footer__links__grep">|</li>

                                <li class="footer__links__list"><a
                                        href="javascript:void(0)" target="_blank"
                                        data-spm="flink3">公司大事记</a></li>
                                <li class="footer__links__grep">|</li>

                                <li class="footer__links__list"><a
                                        href="javascript:void(0)" target="_blank"
                                        data-spm="flink4">协议及隐私权政策</a></li>
                                <li class="footer__links__grep">|</li>

                                <li class="footer__links__list"><a
                                        href="javascript:void(0)"
                                        target="_blank" data-spm="flink5">廉正举报</a></li>
                                <li class="footer__links__grep">|</li>

                                <li class="footer__links__list"><a
                                        href="javascript:void(0)" target="_blank"
                                        data-spm="flink6">联系合作</a></li>
                                <li class="footer__links__grep">|</li>

                                <li class="footer__links__list"><a
                                        href="javascript:void(0)"
                                        target="_blank" data-spm="flink7">招聘信息</a></li>
                                <li class="footer__links__grep">|</li>

                                <li class="footer__links__list"><a
                                        href="javascript:void(0)"
                                        target="_blank" data-spm="flink8">防骗秘籍</a></li>
                            </ul>
                            <div class="footer__ft">
                                <div class="footer__ft_fl">
                                    <a href="javascript:void(0)" target="_blank"
                                       class="footer__ft__logo">
                                        <img src="../static/damai/image/login/TB1NTQWxlLoK1RjSZFuXXXn0XXa-167-60.png"
                                             th:src="@{/damai/image/login/TB1NTQWxlLoK1RjSZFuXXXn0XXa-167-60.png}"
                                             alt="">
                                    </a>
                                    <div class="footer__ft__code__box">
                                        <img class="footer__ft__code"
                                             src="../static/damai/image/login/TB1r0uFxHSYBuNjSspiXXXNzpXa-280-280.png"
                                             th:src="@{/damai/image/login/TB1r0uFxHSYBuNjSspiXXXNzpXa-280-280.png}"
                                             alt="">
                                        <span>APP下载</span>
                                    </div>
                                </div>
                                <div class="footer__ft_fr">
                                    <div class="footer__fr__contact">

                                        <a style="margin-left:0;"
                                           href="javascript:void(0)"
                                           class="footer__fr__contact__btn alime">在线客服</a>
                                    </div>
                                    <ul class="footer__ft__words">
                                        <li class="footer__ft__certificate"><a
                                                href="javascript:void(0)"
                                                target="_blank">京ICP证031057号</a></li>
                                        <li class="footer__ft__grep">|</li>
                                        <li class="footer__ft__certificate"><a href="javascript:void(0)"
                                                                               target="_blank">京ICP备11043884号</a></li>
                                        <li class="footer__ft__grep">|</li>
                                        <li class="footer__ft__certificate"><a
                                                href="javascript:void(0)"
                                                target="_blank">京公网安备11010102000430号</a>
                                        </li>
                                        <li class="footer__ft__grep">|</li>
                                        <li class="footer__ft__certificate"><a
                                                href="javascript:void(0)"
                                                target="_blank">广播电视节目制作经营许可证
                                            (京)字第02253号</a></li>
                                    </ul>
                                    <ul class="footer__ft__words">
                                        <li class="footer__ft__certificate"><a
                                                href="javascript:void(0)"
                                                target="_blank">网络文化经营许可证
                                            京网文[2016]3438-413号</a></li>
                                        <li class="footer__ft__grep">|</li>
                                        <li class="footer__ft__certificate"><a
                                                href="javascript:void(0)"
                                                target="_blank">营业性演出许可证
                                            京市演587号</a></li>
                                    </ul>
                                    <ul class="footer__ft__words">
                                        <li class="footer__ft__certificate">北京红马传媒文化发展有限公司 版权所有</li>
                                        <li class="footer__ft__certificate"><a
                                                href="javascript:void(0)">大麦网</a></li>
                                        <li>Copyright 2003-2018 All Rights Reserved</li>
                                    </ul>
                                    <div class="footer__ft__img">
                    <span id="siteseal">
                    <script async="" type="text/javascript">
                            function verifySeal() {
                                var bgHeight = "null";
                                var bgWidth = "593";
                                var url = "https:\/\/seal.godaddy.com\/verifySeal?sealID=LU6rXPgk5BZ67ZEYpYS2JcN3AyCJOs6aD3HBo4dwA3iGeqp6csKFmqgB0zLL";
                                window.open(url, 'SealVerfication', 'menubar=no,toolbar=no,personalbar=no,location=yes,status=no,resizable=yes,fullscreen=no,scrollbars=no,width=' + bgWidth + ',height=' + bgHeight);
                            }
                    </script>
                    <img style="cursor:pointer;cursor:hand" class="footer__ft__img1"
                         src="../static/damai/image/footer/TB1gw_ZxNWYBuNjy1zkXXXGGpXa-131-32.gif"
                         th:src="@{/damai/image/footer/TB1gw_ZxNWYBuNjy1zkXXXGGpXa-131-32.gif}"
                         onclick="verifySeal();"
                         alt="SSL site seal - click to verify" data-spm-anchor-id="a2o6e.home.0.i1.5b4d48d3mVzb2Z">
                    </span>
                                        <a rel="nofollow" title="电子营业执照" target="_blank"
                                           href="javascript:void(0)">
                                            <img class="footer__ft__img2" alt=""
                                                 src="../static/damai/image/footer/TB1ZO80pyOYBuNjSsD4XXbSkFXa-141-41.png"
                                            th:src="@{/damai/image/footer/TB1ZO80pyOYBuNjSsD4XXbSkFXa-141-41.png}">
                                        </a>

                                        <a rel="nofollow" target="_blank" href="https://www.pcisecuritystandards.org/">
                                            <img src="../static/damai/image/footer/TB1Y580pyOYBuNjSsD4XXbSkFXa-83-50.png"
                                                 th:src="@{/damai/image/footer/TB1Y580pyOYBuNjSsD4XXbSkFXa-83-50.png}"
                                                 class="footer__ft__img3">
                                        </a>
                                        <a rel="nofollow" target="_blank"
                                           href="http://www.itrust.org.cn/home/index/itrust_certifi/wm/1756737221">
                                            <img src="../static/damai/image/footer/TB1pM_ZxNWYBuNjy1zkXXXGGpXa-114-40.png"
                                                 th:src="@{/damai/image/footer/TB1pM_ZxNWYBuNjy1zkXXXGGpXa-114-40.png}"
                                                 class="footer__ft__img4w">
                                        </a>
                                        <a target="_blank" href="javascript:void(0)"
                                           id="___szfw_logo___">
                                            <img class="footer__ft__img4"
                                                 src="../static/damai/image/footer/TB1C4nNxTlYBeNjSszcXXbwhFXa-114-42.png"
                                            th:src="@{/damai/image/footer/TB1C4nNxTlYBeNjSszcXXbwhFXa-114-42.png}">
                                        </a>
                                        <script type="text/javascript">(function () {
                                            document.getElementById('___szfw_logo___').oncontextmenu = function () {
                                                return false;
                                            }
                                        })();</script>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!--module -->
            </div>
        </div>
        <!--col -->
    </div>
    <!-- row -->
</div>
<!--页面底部end-->
<script src="../static/js/jquery-3.3.1.min.js" th:src="@{/js/jquery-3.3.1.min.js}"></script>
<script th:inline="javascript">

    $('input[data-for=phone]').blur(function () {
        checkPhone();
    });

    var msg = [[${msg}]];
    if(msg != null ){
        alert(msg);

    }


    //注册成功返回信息
    var registerSuc = [[${registerSuc}]];
    if(registerSuc != null ){
        alert(registerSuc);
        window.location='/';
    }

    $(function () {
        $('button[data-for=registerBtn]').click(function () {

            if (!checkPassword()){
                return;
            }


            var phone = $('input[data-for=phone]').val();
            var phonePatm = /^1[34578]\d{9}$/;


            if(phone===''){
                alert('手机号不能为空');
                return ;
            }
            if(!phonePatm.test(phone)){
                alert('手机号码格式不正确，请重新输入');
                return ;
            }

            $('form[data-for=form]').submit();

        })
    });

    //检查phone是否注册
    function checkPhone() {

        var phone = $('input[data-for=phone]').val();
        $.ajax({
            url:'/user/phone/'+phone+'/exists',
            type:'get',
            success:function (data) {
                if(data == 'OK'){
                    alert('手机号已注册');
                    return true;
                }else {
                    return false;
                }
            }
        });

    }



    function checkPassword() {
        var password = $('input[data-for=password]').val();
        var repassword = $('input[data-for=rePassword]').val();
        if(password != repassword){
            alert('两次密码不同，请重新输入');
            return false;
        }else {
            password = password.trim();
            if (isNull(password)){
                alert('密码不能为空');
                return false;
            }
        }
        return true;
    }


    // 非空判断==============================================
    function isNull(data) {
        if (data === null || data === undefined || data === '') {
            return true;
        } else {
            return false;
        }
    }
</script>
</body>
</html>